package top.huxy.boot.controller.all;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.huxy.boot.annotation.NoRecordRequest;
import top.huxy.boot.util.obj.Result;

import javax.servlet.http.HttpServletRequest;

/**
 * @Classname ErrorController
 * @Description ErrorController
 * @Date 2021/9/19 22:57
 * @Created by huxy
 */
@Controller
public class NotFoundController  {

    @RequestMapping("/**")
    @ResponseBody
    @NoRecordRequest
    public Result notFound(HttpServletRequest request){
        return Result.notFound("404 for "+request.getRequestURI(),request.getRequestURI());
    }
}
